-
Notifications
You must be signed in to change notification settings - Fork 4
Config validation #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Config validation #253
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was
linked to
issues
Jul 23, 2025
13e8fa3 to
1bc352e
Compare
- Replaced direct YAML loading with a new configuration loader that validates and transforms the configuration into a legacy format. - Introduced error handling for configuration validation failures, providing user-friendly messages and documentation links. - Added `pydantic` dependency for enhanced configuration validation. - Created new modules for configuration loading and validation to improve code organization.
- Added missing newlines at the end of files in `loader.py` and `validation.py` to adhere to PEP 8 standards.
- Integrated a custom logger for error messages in `config.py`, `loader.py`, and improved error handling for configuration validation failures. - Replaced print statements with logger calls to provide better error tracking and maintainability.
- Introduced a unified configuration system that combines environment variables and application settings for improved maintainability and backward compatibility. - Updated `config.py`, `main.py`, and various application modules to utilize the new configuration structure. - Enhanced error handling and logging for configuration loading and validation processes. - Removed deprecated direct environment variable access in favor of the new configuration methods.
- Added SIGHUP signal handler for dynamic configuration reloading without restarting the application. - Introduced command-line argument parsing to validate configuration and exit if requested. - Updated `load_unified_config` and `reload_config` functions for improved error handling and logging. - Enhanced the `validate_config_only` function to provide detailed validation feedback. - Refactored `main.py` to integrate new features and improve application startup logic.
- Updated `reload_config` function to check for application type consistency before applying new configurations. - Added logging for scenarios where the application type has changed, ensuring current configuration is retained in such cases.
- Moved the setup of the SIGHUP signal handler to the main execution block to ensure it is only set when the application is run directly, improving clarity and control over signal handling during application startup.
- Updated the application configuration structure to introduce specific classes for different application types, enhancing clarity and maintainability. - Improved the channel initialization logic in `ChannelManager` to handle missing channel definitions more gracefully and ensure default channels are used appropriately. - Added utility methods for extracting channel IDs and validating configuration structures, streamlining the configuration validation process. - Enhanced incident handling by introducing methods to extract step types and values, improving code readability and maintainability.
- Updated the application type references in `main.py` and `validation.py` to use the `ApplicationType` enum for improved clarity and consistency. - Changed the `NULL` value to `NONE` in the `ApplicationType` enum to better reflect its purpose. - Adjusted related logic in the `NullApplicationConfig` and validation methods to align with the updated enum values.
- Update IncidentNotifications adding `new_firing` and `partial_resolved` - Changed actual incident version
01176ec to
e1cdcee
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
--checkkey during the app startHUPsystem signal